<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>发布新闻</title>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/ckeditor/ckeditor.js"></script>
<style type="text/css">
body {
	width：100%;
	height: 100%;
	background-image: url(../images/1.png);
	background-repeat: no-repeat;
	background-size: cover;;
}
table{
	margin:50px 20%;


}
th{
	padding:5px;
	opacity: 0.7;
	font-size:30px;
	font-family: 楷体;
}
td{
	padding:5px;
}
.hint{
	opacity: 0.7;
	font-family: 楷体;
}
.inp{
	width:500px;
	
}
.bt{
    letter-spacing:2em;
	padding:5px 0 5px 2em;
	opacity: 0.7;
	background:transparet;
	border-width:0px;
	outline:none;
	margin:0px 20px;
}
.bt:hover{
 background:red;

}
input[type=text]{
	height:1.5em;
	width:20em;
	border-radius:10px;
	text-indent:0.5em;
	background:white;
	opacity: 0.7;
}
textarea{
width:300px;
height:150px;
opacity: 0.7;
overflow-y:hidden

}
</style>
</head>
<script type="text/javascript">
var biaoti,neirong;
function checkAll(){
	biaoti=tab.biaoti.value;
	if(biaoti.length==0){
		alert("新闻标题不能为空！");
		return false;
	}
	neirong=tab.neirong.value;
	if(neirong.length==0){
		alert("新闻正文不能为空！");
		return false;
	}
	return true;
}
</script>
<body >
<%

%>
<form action="../ServletNewsAdd" method="post" name="tab" onsubmit="return checkAll();">
<table>
	<tr>
		<th colspan="2">发布新闻</th>
	</tr>
	<tr>
		<td class="hint">新闻标题</td>
		<td><input class="inp" type="text" name="title" autofocus="autofocus"></td>
	</tr>
	<tr>
		<td class="hint">新闻正文</td>
		<td><textarea   name="content" class="ckeditor"></textarea></td>
	</tr>
	<tr>
		<td colspan="2" style="text-align:center;">
			<input class="bt" type="submit" value="提交">
			<input class="bt" type="reset" value="重置">
		</td>
	</tr>
</table>
</form>
</body>
</html>